package com.borya.model.entity;

import org.apache.commons.lang3.StringUtils;

/**
 * 号码入库的信息
 * @author borya
 *
 */
public class PhoneSource {
	
	private int id;
	private String sourceStr;//文本内容
	private boolean sourceTrue = true;//资源是否正确
	private int sourceLine;//资源行数
	
	private String resInstId;
	private String phone;
	private String cityCode;
	private String numberLevel;
	private String bigNumberLevel;
	private String imsi;
	private String sourceDealerId="";
	
	private int pretty = 2;//1靓号2普号
	private int recommendation=0;//1推荐0不推荐
	
	private String smsp;//smsp
	private String phoneModelType = "yuantel";
	private String tfPhoneModelType = "";
	private String cardMoney;
	
	private int phoneType = 1;//1远特2联通
	//2018-03-01
	private String cardMoneyCode = "1";
	
	private String descStr;//错误描述
	private String unicomDealerId;
	private int service_type=1;//1大众号2预售卡

	private int levelCode;
	private int bigLevelCode;
	private String rightEight;
	private int provinceCode;
	private int leftThree;
	private int monopolyType;



	public int getMonopolyType() {
		return monopolyType;
	}

	public void setMonopolyType(int monopolyType) {
		this.monopolyType = monopolyType;
	}

	public int getLeftThree() {
		return leftThree;
	}

	public void setLeftThree(int leftThree) {
		this.leftThree = leftThree;
	}

	public int getProvinceCode() {
		return provinceCode;
	}

	public void setProvinceCode(int provinceCode) {
		this.provinceCode = provinceCode;
	}

	public String getRightEight() {
		return rightEight;
	}

	public void setRightEight(String rightEight) {
		this.rightEight = rightEight;
	}

	@Override
	public String toString() {
		final StringBuilder sb = new StringBuilder("PhoneSource{");
		sb.append("id=").append(id);
		sb.append(", sourceStr='").append(sourceStr).append('\'');
		sb.append(", sourceTrue=").append(sourceTrue);
		sb.append(", sourceLine=").append(sourceLine);
		sb.append(", resInstId='").append(resInstId).append('\'');
		sb.append(", phone='").append(phone).append('\'');
		sb.append(", cityCode='").append(cityCode).append('\'');
		sb.append(", numberLevel='").append(numberLevel).append('\'');
		sb.append(", bigNumberLevel='").append(bigNumberLevel).append('\'');
		sb.append(", imsi='").append(imsi).append('\'');
		sb.append(", sourceDealerId='").append(sourceDealerId).append('\'');
		sb.append(", pretty=").append(pretty);
		sb.append(", recommendation=").append(recommendation);
		sb.append(", smsp='").append(smsp).append('\'');
		sb.append(", phoneModelType='").append(phoneModelType).append('\'');
		sb.append(", tfPhoneModelType='").append(tfPhoneModelType).append('\'');
		sb.append(", cardMoney='").append(cardMoney).append('\'');
		sb.append(", phoneType=").append(phoneType);
		sb.append(", cardMoneyCode='").append(cardMoneyCode).append('\'');
		sb.append(", descStr='").append(descStr).append('\'');
		sb.append(", unicomDealerId='").append(unicomDealerId).append('\'');
		sb.append(", service_type=").append(service_type);
		sb.append(", levelCode=").append(levelCode);
		sb.append(", bigLevelCode=").append(bigLevelCode);
		sb.append(", rightEight='").append(rightEight).append('\'');
		sb.append(", provinceCode=").append(provinceCode);
		sb.append(", leftThree=").append(leftThree);
		sb.append(", monopolyType=").append(monopolyType);
		sb.append('}');
		return sb.toString();
	}

	public int getLevelCode() {
		return levelCode;
	}

	public void setLevelCode(int levelCode) {
		this.levelCode = levelCode;
	}

	public int getBigLevelCode() {
		return bigLevelCode;
	}

	public void setBigLevelCode(int bigLevelCode) {
		this.bigLevelCode = bigLevelCode;
	}

	public int getService_type() {
		return service_type;
	}

	public void setService_type(int service_type) {
		this.service_type = service_type;
	}

	public String getDescStr() {
		return descStr;
	}
	public void setDescStr(String descStr) {
		this.descStr = descStr;
	}
	public String getSourceStr() {
		return sourceStr;
	}
	public void setSourceStr(String sourceStr) {
		this.sourceStr = sourceStr;
	}
	public String getResInstId() {
		return resInstId;
	}
	public void setResInstId(String resInstId) {
		this.resInstId = resInstId;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	public String getCityCode() {
		return cityCode;
	}
	public void setCityCode(String cityCode) {
		this.cityCode = cityCode;
	}
	public String getNumberLevel() {
		return numberLevel;
	}
	public void setNumberLevel(String numberLevel) {
		this.numberLevel = numberLevel;
	}
	public String getBigNumberLevel() {
		return bigNumberLevel;
	}
	public void setBigNumberLevel(String bigNumberLevel) {
		this.bigNumberLevel = bigNumberLevel;
	}
	public String getImsi() {
		return imsi;
	}
	public void setImsi(String imsi) {
		this.imsi = imsi;
	}
	public String getSourceDealerId() {
		return sourceDealerId;
	}
	public void setSourceDealerId(String sourceDealerId) {
		this.sourceDealerId = sourceDealerId;
	}
	public int getPretty() {
		return pretty;
	}
	public void setPretty(int pretty) {
		this.pretty = pretty;
	}
	public int getRecommendation() {
		return recommendation;
	}
	public void setRecommendation(int recommendation) {
		this.recommendation = recommendation;
	}
	public String getPhoneModelType() {
		return phoneModelType;
	}
	public void setPhoneModelType(String phoneModelType) {
		this.phoneModelType = phoneModelType;
	}
	public String getCardMoney() {
		return cardMoney;
	}
	public void setCardMoney(String cardMoney) {
		this.cardMoney = cardMoney;
	}
	public boolean isSourceTrue() {
		return sourceTrue;
	}
	public void setSourceTrue(boolean sourceTrue) {
		this.sourceTrue = sourceTrue;
	}
	public int getSourceLine() {
		return sourceLine;
	}
	public void setSourceLine(int sourceLine) {
		this.sourceLine = sourceLine;
	}
	public String getSmsp() {
		return smsp;
	}
	public void setSmsp(String smsp) {
		this.smsp = smsp;
	}
	public int getPhoneType() {
		return phoneType;
	}
	public void setPhoneType(int phoneType) {
		this.phoneType = phoneType;
	}


	public String getCardMoneyCode() {
		return cardMoneyCode;
	}
	public void setCardMoneyCode(String cardMoneyCode) {
		this.cardMoneyCode = cardMoneyCode;
	}
	public String getTfPhoneModelType() {
		return tfPhoneModelType;
	}
	public void setTfPhoneModelType(String tfPhoneModelType) {
		this.tfPhoneModelType = tfPhoneModelType;
	}
	
	public void checkSourceYt(){
		if(StringUtils.isBlank(resInstId)
				||StringUtils.isBlank(phone)
				||StringUtils.isBlank(cityCode)
//				||StringUtils.isBlank(imsi)
				||StringUtils.isBlank(sourceDealerId)
				|| Long.valueOf(cardMoney) < 0){
			setSourceTrue(false);
			setDescStr("参数错误，need:resInstId、phone、cityCode、sourceDealerId");
		}
	}
	
	public void checkSourceUnicom(){
		if(StringUtils.isBlank(phone)
				||StringUtils.isBlank(cityCode)
				|| Long.valueOf(cardMoney) < 0){
			setSourceTrue(false);
			setDescStr("参数错误，need:phone、cityCode");
		}
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public String getUnicomDealerId() {
		return unicomDealerId;
	}
	public void setUnicomDealerId(String unicomDealerId) {
		this.unicomDealerId = unicomDealerId;
	}
}
